package com.alennus.blog.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

/**
 * Created by pactera on 2018/5/16.
 */
@Data
@Document
public class Role extends AbstractDocument {

    @NotNull
    private String name;// 角色标识程序中判断使用,如"admin",这个是唯一的:
    private String description;// 角色描述,UI界面显示使用
    private boolean available = Boolean.FALSE;// 是否可用,如果不可用将不会添加给用户


    private String createdDate;

    private String updateDate;

    @Transient
    private List<String> roleMenus;

}
